package com.changgou.seckill.dao;

import com.changgou.seckill.pojo.SeckillGoods;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;




public interface SeckillGoodsMapper extends Mapper<SeckillGoods>  {


    @Select("SELECT g.id , g.goods_id ,g.title ,g.sn ,g.price ,g.cost_price, g.num ,g.stock_count ,g.top_count ,g.sort FROM tb_seckill_goods g WHERE g.id IN (SELECT goods_id FROM tb_seckill_time_goods WHERE time_id=#{time_id})")
    Page<SeckillGoods> findPageById(@Param("time_id") int id);
}
